package com.freecloud.whispered.system;

import com.freecloud.framework.repository.BaseRepositoryFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: maomao
 * @Date: 2019-06-16 22:05
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.freecloud.*"})
@EnableJpaRepositories(basePackages = {"com.freecloud.whispered.*","com.freecloud.framework.repository"},
        repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class)//指定自己的工厂类
@EntityScan(basePackages = "com.freecloud.whispered.*")
@Configuration
@EnableFeignClients(basePackages = "com.freecloud.whispered.*")
@EnableDiscoveryClient
@EnableCaching
public class SystemBootstrap {

    public static void main(String[] args) {
        SpringApplication.run(SystemBootstrap.class, args);
    }
}
